using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Utils;

public class CharacterPanel : MonoBehaviour
{
    private Button closeBtn;
    
    private void Awake()
    {
        closeBtn = UITool.GetComponent<Button>("BG/Close", gameObject); 
        closeBtn.onClick.AddListener(DestroySelf);
    }

    private void OnDestroy()
    {
        closeBtn.onClick.RemoveListener(DestroySelf);
    }

    private void DestroySelf()
    {
        Destroy(gameObject);
    }
}